<?php
class LeagueTO {
        private $IDLeague = '';
	private $shortName   = '';
	private $fullName   = '';
        private $IDCountry = '';
        private $gameList = array();

	function __construct(){
	}

        public function getIDLeague(){
            return $this->IDLeague;
        }
        public function setIDLeague($IDLeague){
            $this->IDLeague = $IDLeague;
        }
        public function getShortName(){
            return $this->shortName;
        }
        public function setShortName($shortName){
            $this->shortName = $shortName;
        }
        public function getFullName(){
            return $this->fullName;
        }
        public function setFullName($fullName){
            $this->fullName = $fullName;
        }
        public function getIDCountry(){
            return $this->IDCountry;
        }
        public function setIDCountry($IDCountry){
            $this->IDCountry = $IDCountry;
        }
        public function getGameList(){
            return $this->gameList;
        }
        public function setGameList($gameList){
            $this->gameList = $gameList;
        }
        public function toArray(){
            $data = array(
                'IDLeague' => $this->getIDLeague(),
                'shortName' => $this->getShortName(),
                'fullName' => $this->getFullName(),
                'IDCountry' => $this->getIDCountry()
                //'gameList' => $this->getGameList()
            );
            return $data;
        }

        public function toString(){
            $ret = 'League(IDLeague: '.$this->IDLeague.
                    ';shortName: '.$this->shortName.
                    ';fullName: '.$this->fullName.
                    ';IDCountry: '.$this->IDCountry.')';
            $ret .= "Games[";
            foreach($this->gameList as $game){
                $ret .= "{";
                $ret .= $game->toString();
                $ret .= "}";
            }
            $ret .= "]";
            return $ret;
        }
}
?>
